package com.hornsun.repository;

import com.hornsun.domain.dbo.HealthIndex;
import com.hornsun.repository.mapper.HealthIndexMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.RequestParam;

import javax.annotation.Resource;

/**
 * Created by 编译中... on 2018/2/5.
 */
@Repository
public class HealthIndexRepository {
    @Resource
    private HealthIndexMapper healthIndexMapper;

    public int addHealthIndex(@RequestParam("healthIndex")HealthIndex healthIndex){
        return healthIndexMapper.insertSelective(healthIndex);
    }
    public HealthIndex getLastHealthIndex(String memberGuid){
        return healthIndexMapper.selectLastHealthIndex(memberGuid);
    }
}
